import { State } from ".";

export default {
  addTags(state: State, tag: any) {
    if (state.tags.find((i: any) => i.path === tag.path) === undefined) {
      state.tags.push(tag);
    }
  },
  deleteTags(state: State, tag: any) {
    state.tags.splice(
      state.tags.findIndex((i: any) => i === tag),
      1
    );
  },
};
